﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Upload.aspx.cs" Inherits="Admin_Upload" %>
<%@ Register src="../Controls/Pager.ascx" tagname="Pager" tagprefix="uc1" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>Upload Picture</title>
    <link href="Styles/reset.css" rel="stylesheet" type="text/css" />
    <link href="Styles/site.css" rel="stylesheet" type="text/css" />
    <script type="text/javascript">
        function select(imageName) {
            window.opener.document.getElementById('<%=id %>').value = imageName;
            close();
        }
    </script>
</head>
<body>
    <form id="form1" runat="server">
    <div class="upload">
    <asp:Label runat="server" ID="lblStatus" CssClass="status" />
    <asp:Label ID="lblImageFile" runat="server" Text="Image File:"
    AssociatedControlID="upImage"/>
    <asp:FileUpload ID="upImage" runat="server" />
    <asp:Button ID="btnUpload" runat="server" Text="Upload" />
    <hr />
    <uc1:Pager ID="pagerTop" runat="server" Visible="false" />
    <div class="imagelist">
        <asp:DataList runat="server" ID="dlImage" RepeatColumns="5"
                RepeatDirection="Horizontal">
            <ItemTemplate> 
                <a href="javascript:void(0)" onclick="select('<%#Eval("Name") 
                %>')">
                    <img
        src='<%#DataAccess.Link.ToProductImage(Eval("Name").ToString())  %>' />
                </a>
                <p>
                    <%# Eval("Name") %>
                </p>
            </ItemTemplate>
        </asp:DataList>
    </div>
    <uc1:Pager ID="pagerBottom" runat="server" Visible="false" />
    </div>
    </form>
</body>
</html>
